package net.viralpatel.docmanager.controller;

import java.util.Map;

import javax.servlet.http.HttpServletResponse;

import net.viralpatel.docmanager.model.Document;

import org.springframework.web.multipart.MultipartFile;

public interface DocumentController {

	/*
	 * index method – 
	 * This method uses list() method of DocumentDAO to fetch the list of all documents from database. 
	 * Note that we have mapped request “/index” to this method. Thus Spring will automatically calls this method whenever it 
	 * encounters this url in request.
	 */
	public abstract String index(Map<String, Object> map);

	public abstract String save(Document document, MultipartFile file);

	public abstract String download(Integer documentId,
			HttpServletResponse response);

	public abstract String remove(Integer documentId);

}